Hello. I have a problem. I created a code in november of 2012, I tested and everything. Its was working. But now I'm getting the message that the variable is unassigned. The thing is I dont remember how the did some things in this code. So if anyone can help see the error in the dxl, or at least the reason why, I would appreciate. Thanks...
void createBSD(){ }
void addBSD(){
create(BSD, major, "", "", newBS)
braolive - Wed Jun 12 14:07:02 EDT 2013 |
Re: unassigned variable I found the problem. The baselineSet is not being closed. Is the close or the save part that is wrong? |
Re: unassigned variable It would help if you told us which line of code was giving the error. I don't know about this case, but there are some "close" or "delete" commands that leave the variable undefined rather than null. I cannot see the code well, but it appears to me the "save(BSD)" command is outside the loop when it should be inside. However, the BSD variable should be valid and contain the last bsd in the loop. -Louie |
Re: unassigned variable llandale - Wed Jun 12 15:50:04 EDT 2013 It would help if you told us which line of code was giving the error. I don't know about this case, but there are some "close" or "delete" commands that leave the variable undefined rather than null. I cannot see the code well, but it appears to me the "save(BSD)" command is outside the loop when it should be inside. However, the BSD variable should be valid and contain the last bsd in the loop. -Louie I have find the solution. I unlock the baseline before the addModules(), then I forgot to lock it again. The problem is more with the order of the commands. I read the dxl reference manual and change the dxl to this:
void addBSD(){
create(BSD, major, "", "", newBS) now its working. |